Repository navigation
Keep the own-account read policies' released description (self-host update rollback) - #533
Merged
Merged
Conversation
v0.8.57 changed the Description of the GatewayOwnAccountRead and
WorkerOwnAccountRead managed policies. Description forces a replacement,
the replacement keeps the generated name, and IAM refused the create
("A policy called ... already exists"), so updates from v0.8.56 rolled back.
The released wording is restored; the update is an in-place policy document
change again.
A test now pins Description, ManagedPolicyName and Path of every managed
policy in the native release (test/fixtures/released-managed-policies.json).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updating a self-hosted install from v0.8.56-beta.20261109 to v0.8.57-beta.20261109 rolled back. The Api stack's
GatewayOwnAccountReadfailed with "A policy called coderhelm-prod-GatewayOwnAccountRead-aa934871 already exists. Duplicate names are not allowed", andMcpProxywas cancelled with it.#526 changed the
Descriptionof the managed policygrantOwnAccountReadcreates (infra/lib/own-account-read.ts) to add "Bedrock knowledge bases". Description forces CloudFormation to replace anAWS::IAM::ManagedPolicy. The replacement keeps the generated name, and the create runs before the delete, so IAM refuses it. The same change hitWorkerOwnAccountReadin the Worker stack, which would have failed next.This restores the released description, so the update is an in-place policy document change again. A test now catches this class of change before release.
Changes
infra/lib/own-account-read.ts: the description is back to the v0.8.56 string. A comment says why it is frozen and where the new scope lives (the statements).infra/test/fixtures/released-managed-policies.json(new):Description,ManagedPolicyNameandPathof every managed policy in the native release (parent and every child template), keyed by template and logical id, taken from the v0.8.56-beta.20261109 build.infra/test/native.test.ts: a new test fails when any pinned value changes. Its message says the change replaces the policy, fails every install's update with "already exists", and that new wording belongs in a code comment or a statementSid, not the description. It also fails on a managed policy missing from the fixture, so a new policy is pinned from its first release. Removing a policy is allowed.Verification
buildNative, then compared every resource present in both. With the fix, the only changed properties are LambdaEnvironment(Gateway, Worker, Streaming, Updater), CloudFrontDistributionConfig,ReleaseAssetsFiles, and the two own-account policies'PolicyDocument. All of these update in place. Everything else is new (the /mcp, /.well-known and /oauth routes and their permissions). No other replacement-forcing property changed.Api/GatewayOwnAccountReadandWorker/WorkerOwnAccountRead.npm testin infra/: 157 of 157 pass.cfn-linton every native template: no errors, only the existing W3005 and W2531 warnings.